package main

import (
	"fmt"
	"github.com/lxn/walk"
)

// Author : CSR丶WARRIOR
// Time ： 2020/10/22  20:51
// TOOLS : GoLand
// FILENAME : window.go
// STATEMENT: 窗体的创建

type Window interface {
	ShowWindow()
}

//创建压缩解压界面类
type ComWindow struct {
	*walk.MainWindow //主窗体
	Window
}

func NewComWindow() *ComWindow {
	return &ComWindow{}
}

// 提示信息界面
type LabWindow struct {
	Window
}

func NewLabWindow() *LabWindow {
	return &LabWindow{}
}

//创建界面类对象
func Show(winType string) {
	var win Window
	switch winType {
	case "main_window":
		win = NewComWindow()
	case "lab_window":
		win = NewLabWindow()
	default:
		fmt.Println("参数传递错误")
	}
	win.ShowWindow()
}
